import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import Music from '../views/Music/Music.vue'
const routes = [
  {path:'/',redirect:'/music'},
  {
    path: '/music',
    name: 'Music',
    component: Music,
    meta: {
      isNav: true
    },
  },
  {
    path: '/movie',
    name: 'Movie',
    component: () => import('../views/Movie/Movie.vue'),
    meta: {
      isNav: true
    },
  },
  {
    path: '/article',
    name: 'Article',
    component: () => import('../views/Article/Article.vue'),
    meta: {
      isNav: true
    },
  } ,
  {
    path: '/MovieDetail',
    name: 'MovieDetail',
    component: () => import('../views/Movie/detail.vue')
  },
  {
    path: '/city',
    name: 'City',
    component: () => import('../views/Music/City.vue')
  },
  {
    path: '/moreDetail/:id',
    name: 'MoreDetail',
    component: () => import('../views/Movie/MoreDetail')
  },
  {
    path: '/movieSearch',
    name: 'MovieSearch',
    component: () => import('../views/Movie/MovieSearch.vue')
  },
  {
    path: '/articleDetail/:id',
    name: 'ArticleDetail',
    component: () => import('../views/Article/detail.vue')
  },
  {
    path: '/musicSearch',
    name: 'MusicSearch',
    component: () => import('../views/Music/MusicSearch.vue')
  },
  {
    path: '/musicDetail/:id',
    name: 'MusicDetail',
    component: () => import('../views/Music/detail.vue')
  },
  {
    path: '/moreMusic',
    name: 'MoreMusic',
    component: () => import('../views/Music/More.vue')
  },
  {
    path: '/play/:id',
    name: 'Play',
    component: () => import('../views/Music/Play.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
